'use strict';
/**
 * Created by deng on 16-1-19.
 */
angular.module('metalabOperationApp').config(['$stateProvider', function ($stateProvider) {

    $stateProvider
        .state('meta.permission.research', {
            url: '/research',
            abstract: true,
            views: {
                'content': {
                    templateUrl: 'views/permission/common/content.html'
                }
            }
        }).state('meta.permission.research.space', {
            url: '/space',
            abstract: true
        }).state('meta.permission.research.space.list', {
            url: '/list?disciplineClass&discipline&page&sort&search&value',
            views: {
                'header@meta.permission.research': {
                    templateUrl: 'views/permission/space/header.html',
                    controller: 'HeaderCtrl'
                },
                'body@meta.permission.research': {
                    templateUrl: 'views/permission/space/index.html',
                    controller: 'SpaceListCtrl'
                },
                'page@meta.permission.research.space.list': {
                    templateUrl: 'views/permission/common/page.html'
                },
                //filter
                'meta-disciplineClass-control@meta.permission.research.space.list': {
                    templateUrl: 'views/permission/filter/disciplineClass.html'
                },
                'meta-discipline-control@meta.permission.research.space.list': {
                    templateUrl: 'views/permission/filter/discipline.html'
                },
                //search
                'meta-search@meta.permission.research.space.list': {
                    templateUrl: 'views/permission/common/search.html'
                }
            }
        }).state('meta.permission.research.space.detail', {
            url: '/detail/:id?tab',
            views: {
                'header@meta.permission.research': {
                    templateUrl: 'views/permission/space/header.html',
                    controller: 'HeaderCtrl'
                },
                'body@meta.permission.research': {
                    templateUrl: 'views/permission/common/detail.html',
                    controller: 'SpaceDetailEditCtrl'
                },
                'edit@meta.permission.research.space.detail':{
                    templateUrl: 'views/permission/space/edit.html'
                },
                'control@meta.permission.research.space.detail':{
                    templateUrl: 'views/permission/space/control.html'
                },
                'comment@meta.permission.research.space.detail':{
                    templateUrl: 'views/permission/common/comment.html'
                }
            }
        });
}]);
